package org.flowable.flowablespringb3.demoflow1.listener;


import org.flowable.task.service.delegate.DelegateTask;
import org.flowable.task.service.delegate.TaskListener;
import org.springframework.stereotype.Component;

@Component
public class MyTaskListener implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        switch (delegateTask.getEventName()) {
            case EVENTNAME_CREATE -> {
                //节点创建，指派处理人
                delegateTask.setAssignee("ange");
            }
        }
    }
}
